﻿<%@ Page Language="VB" AutoEventWireup="false" CodeFile="ManageJobCard.aspx.vb" Inherits="Backend_ManageJobCard" %>

<%@ Import Namespace="System.ComponentModel" %>

<%@ Register Src="Menu.ascx" TagName="Menu" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title> Arwani Backend Panel</title>

     <script type="text/javascript">
         function showNestedGridView(obj) {
             var nestedGridView = document.getElementById(obj);
             var imageID = document.getElementById('image' + obj);

             if (nestedGridView.style.display == "none") {
                 nestedGridView.style.display = "inline";
                 imageID.src = "minus.png";
             } else {
                 nestedGridView.style.display = "none";
                 imageID.src = "plus.png";
             }
         }
    </script>

</head>
<body>
    <script type="text/javascript">
        function ConfirmationBox(username) {

            var result = confirm('Are you sure you want to delete ' + username + ' Details');
            if (result) {

                return true;
            }
            else {
                return false;
            }
        }
    </script>

    <script type="text/javascript">
        function basicPopup(invoicenumber) {
        popupWindow = window.open("Fileupload.aspx?id="+invoicenumber, 'popUpWindow', 'height=180,width=420,left=400,top=300,resizable=No,scrollbars=No,toolbar=no,menubar=no,location=no,directories=no, status=No');
        }
</script>


    <form id="form1" runat="server">
    <div class="tablecontent">
        <uc1:Menu ID="Menu1" runat="server" /><br />
        <div style="text-align: center; font-size: 28px; color: Blue">
            <asp:Label ID="lblHeading" runat="server" Text="Manage Job Card" style="color:Black;font-size:XX-Large;text-decoration:underline;"></asp:Label>
        </div><br />
       
        <div align="center">

          <asp:GridView ID="gridViewMaster"  runat="server" AllowPaging="True"
                AutoGenerateColumns="False" CellPadding="0" Cellspecing="0" DataKeyNames="ID"
                ForeColor="Black" GridLines="None" CssClass="table" Width="900px">
                <Columns>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <a href="javascript:showNestedGridView('ID-<%# Eval("ID") %>');">
                                <img id="imageID-<%# Eval("ID") %>" alt="Click to show/hide orders" border="0" src="plus.png" />
                            </a>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="No.">
                        <ItemTemplate>
                            <asp:Label ID="lblID" runat="server" Text='<%# Eval("ID") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Article No">
                        <ItemTemplate>
                            <asp:Label ID="lblarticleNo" runat="server" Text='<%# Eval("Articleno") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Serial No.">
                        <ItemTemplate>
                            <asp:Label ID="lblSerialNo" runat="server" Text='<%# Eval("Serialno") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Purchase Date">
                        <ItemTemplate>
                            <asp:Label ID="lblDate" runat="server" Text='<%#Eval("INVOICE DATE","{0:dd/MM/yyyy}")%>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>

                  

                    <asp:TemplateField>
                        <ItemTemplate>
                            <tr>
                                <td colspan="100%" style="padding:0px;">
                                    <div id="ID-<%# Eval("ID") %>" style="display: none; position: relative; left: 25px;">
                                        <asp:GridView ID="nestedGridView" CellPadding="0" CellSpacing="0" Border="0" Style="margin-bottom: 10px;
                                            border: 0.1em solid #A9A9A9;" Width="95%" GridLines="None" runat="server" AutoGenerateColumns="False"
                                            DataKeyNames="invoiceno" OnRowDataBound="nestedGridView_RowDataBound">
                                            <RowStyle VerticalAlign="Top" ForeColor="#333333" />
                                            <Columns>
                                               
                                                <asp:TemplateField HeaderText="Invoice No">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblinvoiceno" runat="server" Text='<%# Eval("invoiceno") %>'></asp:Label>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="Amount">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lbltotalamt" runat="server" Text='<%#Eval("totalamt","{0:f2}")%>'></asp:Label>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="Repair Date">
                                                    <ItemTemplate>
                                                        <asp:Label ID="deldate" runat="server" Text='<%#Eval("deldate","{0:dd/MM/yyyy}")%>'></asp:Label>
                                                    </ItemTemplate>
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="">
                        <ItemTemplate>

                      <asp:Label ID="lblcheck" runat="server" text='<%# GetCheckedOutValue(HttpUtility.HtmlDecode(Eval("jobcard").ToString()),HttpUtility.HtmlDecode(Eval("invoiceno").ToString())  )%>' /> 
                       
                                           
                  
                               
                    </ItemTemplate>
                    </asp:TemplateField>

                 </Columns>
                                           <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            <EditRowStyle BackColor="#999999" />
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" HorizontalAlign="Left"/>
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" ForeColor="#333333" />
            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                        </asp:GridView>
                                    </div>
                                </td>
                            </tr>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
               <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            <EditRowStyle BackColor="#999999" />
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" HorizontalAlign="Left" />
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" ForeColor="#333333" />
            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
            </asp:GridView>
        
      
        </div>
    </div>
    </form>
</body>
</html>
